package com.example.apidocserver.infrastructure.util.entity;

import com.example.apidocserver.domain.document.entity.ApiParamHis;

/**
 * 接口示例参数
 *
 * @author xyqlg
 */
public class ApiParamHisUtil {

    /**
     * 生成示例数据唯一对象
     *
     * @param apiParamHis 参数示例对象
     * @return 参数示例对象只包含唯一键
     */
    public static ApiParamHis getUniKeyEntity(ApiParamHis apiParamHis) {
        ApiParamHis resultHis = new ApiParamHis();
        resultHis.setParamInputHeaderStr(apiParamHis.getParamInputHeaderStr());
        resultHis.setParamInputPathStr(apiParamHis.getParamInputPathStr());
        resultHis.setParamInputQueryStr(apiParamHis.getParamInputQueryStr());
        resultHis.setParamInputBodyStr(apiParamHis.getParamInputBodyStr());
        resultHis.setParamOutputHeaderStr(apiParamHis.getParamOutputHeaderStr());
        resultHis.setParamOutputBodyStr(apiParamHis.getParamOutputBodyStr());
        resultHis.setApiId(apiParamHis.getApiId()).setEnvId(apiParamHis.getEnvId());
        return resultHis;
    }
}
